<?php

$sale_cycle = 'w6|14:00:00|172800';
hitLastSaleCycle($sale_cycle);

function hitLastSaleCycle($sale_cycle){
	$now = date("Y-m-d H:i:s");
	var_dump($now);
	$w = date("w",$now);
	var_dump($w);
}




exit;
$str = '{"commodity_id":"CM100111","commodity_num":2,"commodity_type":"common"}';
echo urlencode($str);

//http://m.shishifresh.com/Home/Cart/ajaxAddCart?cart_info=%7B%22commodity_id%22%3A%22CM100111%22%2C%22commodity_num%22%3A2%2C%22commodity_type%22%3A%22common%22%7D


exit;
$url = 'http://apis.baidu.com/kingtto_media/106sms/106sms';
$para['mobile'] = '15900851360';
$para['content'] = '【自然鲜】您好，您的短信验证码为123456';
$header = array('apikey: d34dfc3fab88eb04595862997e35a4c8');
$res = httpResponsePOST($url, $para ,$header);
var_dump($res);
function httpResponsePOST($url, $para ,$header=null) {
	$curl = curl_init($url);
	// $para = yzg_array_filter($para);
	$header[] = 'Expect:';
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); //SSL证书认证
	curl_setopt($curl, CURLOPT_HEADER, 0); // 过滤HTTP头
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 显示输出结果
	curl_setopt($curl, CURLOPT_POST, true); // post传输数据
	curl_setopt($curl, CURLOPT_POSTFIELDS, $para); // post传输数据
	curl_setopt($curl, CURLOPT_TIMEOUT, 5); //过期时间秒
	curl_setopt($curl, CURLOPT_HTTPHEADER, $header); //http://www.laruence.com/2011/01/20/1840.html
	$responseText = curl_exec($curl);
	curl_close($curl);
	return $responseText;
}

?>